function _autocomplete(dataList,descrId,valueId) {
	var source=new Array();
	for(var i=0;i<dataList.length;i++) {
		var _json='{"value":"'+dataList[i].value+'","label":"'+dataList[i].descr+'"}';
		source[i]=$.parseJSON(_json);
	}
	$("#"+descrId).autocomplete({
		minLength: 0,
		source: source,
		focus: function(event, ui) {
			$( "#"+descrId ).val(ui.item.label);
			return false;
		},
		select: function(event,ui) {
			$( "#"+valueId ).val(ui.item.value);
			return false;
		}
	})
	.data("ui-autocomplete")._renderItem = function(ul, item) {
		return $("<li>")
		.append("<a style='cursor:pointer'>" + item.label + "</a>")
		.appendTo(ul);
	};
};